package com.kudian.restful.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * UserBonus entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user_bonus")
public class UserBonus implements java.io.Serializable {

	// Fields

	private Integer bonusId;
	private Integer bonusTypeId;
	private String bonusSn;
	private Integer userId;
	private Integer typeId;
	private Timestamp addTime;
	private Timestamp usedTime;
	private Integer orderId;

	// Constructors

	/** default constructor */
	public UserBonus() {
	}

	/** minimal constructor */
	public UserBonus(Integer bonusTypeId, String bonusSn, Integer userId,
			Timestamp addTime, Integer orderId) {
		this.bonusTypeId = bonusTypeId;
		this.bonusSn = bonusSn;
		this.userId = userId;
		this.addTime = addTime;
		this.orderId = orderId;
	}

	/** full constructor */
	public UserBonus(Integer bonusTypeId, String bonusSn, Integer userId,
			Integer typeId, Timestamp addTime, Timestamp usedTime,
			Integer orderId) {
		this.bonusTypeId = bonusTypeId;
		this.bonusSn = bonusSn;
		this.userId = userId;
		this.typeId = typeId;
		this.addTime = addTime;
		this.usedTime = usedTime;
		this.orderId = orderId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "bonus_id", unique = true, nullable = false)
	public Integer getBonusId() {
		return this.bonusId;
	}

	public void setBonusId(Integer bonusId) {
		this.bonusId = bonusId;
	}

	@Column(name = "bonus_type_id", nullable = false)
	public Integer getBonusTypeId() {
		return this.bonusTypeId;
	}

	public void setBonusTypeId(Integer bonusTypeId) {
		this.bonusTypeId = bonusTypeId;
	}

	@Column(name = "bonus_sn", nullable = false, length = 32)
	public String getBonusSn() {
		return this.bonusSn;
	}

	public void setBonusSn(String bonusSn) {
		this.bonusSn = bonusSn;
	}

	@Column(name = "user_id", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "type_id")
	public Integer getTypeId() {
		return this.typeId;
	}

	public void setTypeId(Integer typeId) {
		this.typeId = typeId;
	}

	@Column(name = "add_time", nullable = false, length = 19)
	public Timestamp getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Timestamp addTime) {
		this.addTime = addTime;
	}

	@Column(name = "used_time", length = 19)
	public Timestamp getUsedTime() {
		return this.usedTime;
	}

	public void setUsedTime(Timestamp usedTime) {
		this.usedTime = usedTime;
	}

	@Column(name = "order_id", nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

}